/******************************************************************************
 * File: : Room.h
 * Autor : Thomas Pfeiffer
 * Descr.: Header for the Class Room
 *****************************************************************************/
#ifndef ROOM_H
#define ROOM_H

#include <iostream>
#include "Object.h"

class Side;  // Forward declaration of the class Side

// The class Room represents a Room with four sides.
// A Side can either be a Wall or a Door but the Room
// doesn't know that / doesn't matter which one it is.
class Room : public Object {
public:
	Room (const Room &r);  // Copy constructor
	Room (Side * top, Side * right, Side * bottom, Side * left);
	~Room();  // Destructor: frees all four sides

  // Prints a room. (Calls the printfunctions of the sides.)
  // param printsingle: when true, the room prints it's top 
  // side even if it has a top neighbour. When this function
  // is being called by Roomplan, printsingle is always false
	void Print (bool printsingle = true) const;

  // sets the width and height of a room /
  // the length of the sides
	void setDimension(size_t width, size_t height);

  // The the rooms index / roomnumber
	void setIndex( size_t rnr );
  
  // Returns the rooms index / roomnumber
	size_t getIndex() const;

  // Return the sides
	Side* getTop() const;
	Side* getRight() const;
	Side* getBottom() const;
	Side* getLeft() const;

  // set the sides
	void setTop   (Side* s);
	void setRight (Side* s);
	void setBottom(Side* s);
	void setLeft  (Side* s);
  
private:
	size_t mRoomnumber;
	Side *mTop;
	Side *mRight;
	Side *mBottom;
	Side *mLeft;
};

#endif